<!-- 列表 -->
<extend name="Public:layout" />
<block name="title"><{$authName}></block>

<block name="pluginCSS">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/plugins/select2/select2.css"/>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/plugins/select2/select2-metronic.css"/>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/plugins/bootstrap-timepicker/css/bootstrap-timepicker.min.css"/>
<link href="__PUBLIC__/Admin/plugins/fancybox/source/jquery.fancybox.css" rel="stylesheet" type="text/css"/>
</block>
<block name="CSS">
	<link href="__PUBLIC__/Admin/css/pages/portfolio.css" rel="stylesheet" type="text/css"/>
</block>

<block name="loadJS">
<script type="text/javascript" src="__PUBLIC__/Admin/plugins/select2/select2.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/Admin/plugins/bootstrap-timepicker/js/bootstrap-timepicker.min.js"></script>
<script src="__PUBLIC__/admin/scripts/layer/layer.js" type="text/javascript"></script>	
<script type="text/javascript" src="__PUBLIC__/admin/plugins/jquery-mixitup/jquery.mixitup.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/admin/plugins/fancybox/source/jquery.fancybox.pack.js"></script>
</block>
<block name="setJS">
<script src="__PUBLIC__/Admin/scripts/custom/goodsView.js"></script>
<script>
var ajaxUrl="<{:U('index')}>";
var managerId="<{$Think.session.managerId}>";
var areaId1 = "<{$shops.areaId1}>";
var areaId2 = "<{$shops.areaId2}>";
var areaId3 = "<{$shops.areaId3}>";

</script>
</block>
<block name="initJS">
GoodsView.init();
</block>

<block name="pagetitle">增删改查</block>
<block name="page">
<div class="row">
	<div class="col-md-12">

		<div class="portlet">
			<div class="portlet-title">
				<div class="caption">
					<i class="fa <{$authIco}>"></i><{$authName}>
				</div>				
				<div class="actions">
					<a class="btn default green-stripe" id="table_manager_new" data-toggle="modal" href="javascript:history.back()">
						<i class="fa fa-reply"></i>
						<span class="hidden-480">返回</span>
					</a>
				</div>				
			</div>
			<div class="portlet-body">				
				<form class="form-horizontal">
				<input type="hidden" name="shopId" id="goodsId"  value="<{$goods.goodsId}>" />
				<div class="tabbable">
					<ul class="nav nav-tabs">
						<li class="active">
							<a href="#tab_general" data-toggle="tab">
								 基本信息
							</a>
						</li>


						<if condition="$goods['attrCatId'] gt 0">
						<li>
							<a href="#tab_meta" data-toggle="tab">
								 商品属性
							</a>
						</li>
						</if>

						<notempty name="goods.gallery">
						<li>
							<a href="#tab_grid" data-toggle="tab">
								 商品相册
							</a>
						</li>
						</notempty>
					</ul>
					<div class="tab-content no-space">
						<div class="tab-pane active" id="tab_general">
							<div class="form-body">
								<div class="col-sm-6">
									
									<div class="form-group">
										<label class="col-sm-4 control-label" for="loginName">商品编号：</label>
										<div class="col-md-8">
										<p class="form-control-static">
												 <{$goods.goodsSn}>
											</p>
											
										</div>
									</div>
									<div class="form-group">

										<label class="col-sm-4 control-label" for="loginPwd">商品名称：</label>
										<div class="col-md-8">
										<p class="form-control-static">
												 <{$goods.goodsName}>
											</p>
											
										</div>
									</div>
									
									<div class="form-group">

										<label class="col-sm-4 control-label" for="shopSn">市场价：</label>
										<div class="col-md-8">
										<p class="form-control-static">
												 &yen;<{$goods.marketPrice}>
											</p>
											
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-4 control-label" for="shopName">店铺价格：</label>
										<div class="col-md-8">
										<p class="form-control-static">
												 &yen;<{$goods.shopPrice}>
											</p>
											
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-4 control-label" for="shopCompany">商品库存：</label>
										<div class="col-md-8">
										<p class="form-control-static">
												 <{$goods.goodsStock}> <{$goods.goodsUnit}> 
											</p>
											
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-4 control-label" for="shopCompany">商品状态：</label>
										<div class="col-md-8">
										<p class="form-control-static">
												 <if condition="$goods['isSale'] ==1 ">上架</if>
	             									<if condition="$goods['isSale'] ==0 ">下架</if> 
											</p>
											
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-4 control-label" for="goodsCatId1">商城分类：</label>
										<div class="col-md-8">
										<p class="form-control-static">
										<{$goods.goodsCats.goodsName1}> > <{$goods.goodsCats.goodsName2}> > <{$goods.goodsCats.goodsName3}></p>
											
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-4 control-label" for="goodsCatId1">店铺分类：</label>
										<div class="col-md-8">
										<p class="form-control-static">
										<{$goods.shopCats.goodsName1}> > <{$goods.shopCats.goodsName2}></p>
											
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-4 control-label" for="shopTel">商品信息：</label>
										<div class="col-md-8">
											<p class="form-control-static">
												 <{$goods.goodsSpec}>
											</p>
										</div>
									</div>
									
								</div>

								<div class="col-sm-6">
									<div class="form-group">
										<label>商品略图</label>
										<div>
											<div class="fileinput fileinput-new" data-provides="fileinput">
												<!-- <div class="fileinput-new thumbnail" style="width: 200px; height: 150px;">
													<img src="__UPLOAD__/<{$COMMON.shopLogo|str_replace='.','_m.',###}>"/>
													<img src="__UPLOAD__/<{$goods['goodsImg']?$goods['goodsImg']:$COMMON['goodsImage']|str_replace='.','_m.',###}>"/>
												</div> -->
												<div class="fileinput-preview fileinput-exists thumbnail" style="max-width: 300px; max-height: 400px;">
												<img src="__UPLOAD__/<{$goods['goodsImg']?$goods['goodsImg']:$COMMON['goodsImage']}>"/>
												</div>
												<div>
													
												</div>
											</div>
										</div>
									</div>

									
					                  
									
								</div>

								<div class="clearfix"></div>
								<div class="col-sm-12">
								<div class="form-group">
								
									<label class="col-sm-2 control-label">商品描述：</label>
									<div class="col-md-8">
										<p class="form-control-static">
											  <{$goods.goodsDesc|htmlspecialchars_decode}>
										</p>
									</div>
								</div>
								</div>
								

							</div>
						</div>
						<if condition="$goods['attrCatId'] gt 0">
						<div class="tab-pane" id="tab_meta">
							<div class="form-body">
								<div class="form-group">
								
									<label class="col-sm-2 control-label">商品类型：</label>
									<div class="col-md-8">
										<p class="form-control-static">
											  <{$goods.attrCatName}>
										</p>
									</div>
								</div>
								<div class="form-group">
								
									<label class="col-sm-2 control-label">商品属性：</label>
									<div class="col-md-8">
										<if condition="count($goods.priceAttrs) gt 0">
										<table class="table table-striped table-hover table-bordered" id="table_common">
											<thead>
											<tr>
											  <th>属性</th>
											  <th>规格</th>
											  <th>价格</th>
											  <th>推荐</th>
											  <th>库存</th>
											</tr>
											</thead>
											<volist name="goods.priceAttrs" id="vo">
											<tr>
												<td><{$goods.priceAttrName}></td>
												<td><{$vo['attrVal']}></td>
												<td><{$vo['attrPrice']}></td>
												<td><if condition="$vo.isRecomm eq 1">是</if></td>
												<td><{$vo['attrStock']}></td>
											</tr>
											</volist>
											</table>
										</if>
									</div>
								</div>

							</div>
						</div>
						</if>

						<notempty name="goods.gallery">
						<div class="tab-pane" id="tab_grid">
							<div class="row mix-grid">
								<volist name="goods['gallery']" id="vo" key='i'>
										<div class="col-md-3 col-sm-4 mix category_1">
											<div class="mix-inner">
												<img class="img-responsive" src="__UPLOAD__/<{$vo.goodsImg}>" alt="">
												<div class="mix-details">
													<h4><{$goods.goodsName}></h4>
													<a class="mix-link">
														<i class="fa fa-link"></i>
													</a>
													<a class="mix-preview fancybox-button" href="__UPLOAD__/<{$vo.goodsImg}>" title="<{$goods.goodsName}>" data-rel="fancybox-button">
														<i class="fa fa-search"></i>
													</a>
												</div>
											</div>
										</div>
								</volist>
							</div>
						</div>
						</notempty>

					</div>
				</div>
				
				
				
				
				<div class="col-sm-12">
						<div class="form-group fluid">
			                <div class="col-md-offset-2 col-md-9">
			                <if condition="$goods['goodsStatus'] eq 1">
			                  <button type="submit" class="no btn red"><i class="fa fa-ban"></i> 禁售</button>
			                <else />
			                	<button type="submit" class="yes btn green"><i class="fa fa-check"></i> 通过</button>
			                </if>
			                  <button onclick="history.back()" class="btn default"><i class="fa fa-reply"></i> 返回</button>
			                </div>
		              	</div></div>
			</form>
			</div>
		</div>
	</div>
</div>

</block>